# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Sergej Pupykin <pupykin.s+arch@gmail.com>
# Contributor: Franco Iacomella <yaco@gnu.org>

pkgname=synfig
pkgver=1.4.4
pkgrel=5
pkgdesc='Professional vector animation program (CLI renderer only)'
arch=('loong64' 'x86_64')
url='https://www.synfig.org/'
license=('GPL3')
depends=('fftw' 'imagemagick' 'libjpeg-turbo' 'libmng' 'libxml++2.6' 'mlt' 'openexr' 'pango')
makedepends=('boost' 'etl' 'intltool')
source=("https://downloads.sourceforge.net/synfig/$pkgname-$pkgver.tar.gz")
sha256sums=('cd9882a091433e22e484e47d7bfe542aaefd3f62bfd746d306be4ce964756f06')

build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr --sysconfdir=/etc
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}
